package com.res.share.mapper;

import com.res.share.model.ResStatistics;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.res.share.model.dto.UserStatisModel;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 统计 Mapper 接口
 * </p>
 *
 * @author astupidcoder
 * @since 2021-09-22
 */
public interface ResStatisticsMapper extends BaseMapper<ResStatistics> {

    UserStatisModel findPersionDetail(@Param("userId") Integer userId);

    void updateUserScoreNum(@Param("userId") Integer userId,@Param("score") Integer score);

    void updateUserResNum(@Param("userId") Integer userId,@Param("resNum") Integer resNum);

    void updateResCollectionNums(@Param("userId") Integer userId, @Param("type") Integer type,@Param("nums") Integer nums);

    void updateResHistoryNums(@Param("userId") Integer userId, @Param("type") Integer type,@Param("nums") Integer nums);

}
